package com.intramirror.wd.service.controller;

import com.intramirror.common.base.model.ApiResponse;
import com.intramirror.wd.business.manage.UserManage;
import com.intramirror.wd.business.util.CheckUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author mars
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserManage userManage;

    @PostMapping(value = "/getUserByName")
    public Object editPassword(@RequestParam String name) throws Exception{
        if(CheckUtils.isNotBlank(name)){
            return new ApiResponse<>(userManage.findUserByUserName(name));
        }
        return new ApiResponse<>("success");
    }
}
